package io.renren.modules.generator.service;

import com.baomidou.mybatisplus.service.IService;
import io.renren.common.utils.R;
import io.renren.common.vo.TmsOrderVo;
import io.renren.modules.generator.entity.OrdersEntity;
import org.springframework.web.multipart.MultipartFile;

import java.io.IOException;
import java.util.Collection;
import java.util.List;
import java.util.Map;
import java.util.Set;

/**
 * 
 *
 * @author chenshun
 * @email sunlightcs@gmail.com
 * @date 2018-11-16 11:05:22
 */
public interface OrdersService extends IService<OrdersEntity> {

    List<OrdersEntity> queryPage(Map<String, Object> params);

    R importPdfData(MultipartFile[] multipartFiles) throws IOException;

    int queryPageTotal(Map<String, Object> params);

    void save(OrdersEntity orders);

    void update(OrdersEntity orders);

    Map<String,Set<Map<String, String>>> queryAllFromAddressAndAllToAddress();

    void updateOrderStatusByIds(String status, Collection<Integer> ids);

    void cancelOrderGroupByIds(Map<Integer, List<Integer>> ids);

    void cancelOrderGroupByOrderGroupId(int orderGroupId);

    void orderCreatedGroupByIds(Set<Integer> orderIds, Integer orderGroupId);


    void updateOrderStatusById(String status, Integer id);


    OrdersEntity queryByOrderDetailIdAndOrderId(String orderId, String orderDetailId);

    List<OrdersEntity> queryOrder(String status, String orderGroupNumber, Set<String> toAddressIds);

    List<OrdersEntity> queryOrdersByOrderGroupId(int orderGroupId);

    void addOrderToOrderGroup(Set<Integer> orderIds, int orderGroupId);

    Set<Map<String, String>> queryToDtAreaIdsByOrderIds(Collection<Integer> orderIds);


    List<TmsOrderVo> queryTmsImportData(Map<String, Object> params);

    int queryTmsImportDataTotal(Map<String, Object> params);


}
